#!/bin/bash -e

TOUCHPAD_STATUS=${1-:"1"}

TOUCHPAD_ID=$(xinput list\
| grep -i touchpad \
| grep -o "id=[0-9]*" \
| cut -f 2 -d'=')


[ $TOUCHPAD_STATUS = "1" ] && ACTION="--enable" || ACTION="--disable"

xinput $ACTION $TOUCHPAD_ID
